<?php

class SettingBase{
    function __construct() {
       $this->initialize(); 
    }  
    protected function initialize(){
        
         add_action('wp_print_scripts', array(&$this, 'et_jquery_script'), 8);
     }
    /* Adds jquery script */
    
    protected function et_jquery_script(){
        wp_deregister_script('jquery');
        wp_register_script('jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js', false, '1.8.3'); 
    }



    /* Admin scripts + ajax jquery code */
    protected function ipost_panel_admin_js(){		
            wp_enqueue_script('ipost_functions_init', IPOST_THEME_JS_URL. 'functions-init.js');
            wp_enqueue_script('ipost_colorpicker',IPOST_THEME_JS_URL . 'colorpicker.js');		
            wp_enqueue_script('ipost_colorpicker_eye',IPOST_THEME_JS_URL . 'eye.js');		
            wp_enqueue_script('ipost_colorpicker_utils',IPOST_THEME_JS_URL . 'utils.js');		
            wp_enqueue_script('ipost_colorpicker_layout',IPOST_THEME_JS_URL . 'layout.js');		
            wp_enqueue_script('ipost_functions_bootstrap', IPOST_THEME_JS_URL. 'bootstrap.min.js');
    }
    /* --------------------------------------------- */

    /* Adds additional ipost css */
    protected function ipost_panel_css_admin() { ?> 
            <link rel="stylesheet" href="<?php echo IPOST_THEME_CSS_URL ?>layout.css" type="text/css" />
            <link rel="stylesheet" href="<?php echo IPOST_THEME_CSS_URL ?>colorpicker.css" type="text/css" />
            <link rel="stylesheet" href="<?php echo IPOST_THEME_CSS_URL ?>ipost-admin.css" type="text/css" />
            <link rel="stylesheet" href="<?php echo IPOST_THEME_CSS_URL ?>bootstrap.css" type="text/css" />
            <style type="text/css">
            </style>
            <!--[if IE 7]>
            <style type="text/css">			
            </style>
            <![endif]-->  
            <!--[if IE 8]>
            </style>
            <![endif]-->  
    <?php }
    /* --------------------------------------------- */

    protected function ipost_media_upload_scripts() {
            wp_enqueue_script('media-upload');
            wp_enqueue_script('thickbox');
            //wp_register_script('my-upload', IPOST_THEME_JS_URL.'custom_uploader.js', array('jquery','media-upload','thickbox'));
            //wp_enqueue_script('my-upload');
    }

    protected function ipost_media_upload_styles() {
            wp_enqueue_style('thickbox');
    }
}

?>
